<?php

class Navigation extends CI_Model {

   /* var $title   = '';
    var $content = '';
    var $date    = '';*/

    function __construct()
    {
        // Call the Model constructor
        parent::__construct();
        $this->load->database();
    }
    function get_last_ten_entries()
    {
        $query = $this->db->get('cms_navigation', 10);
        return $query->result();
    }
    
    function get_levels(){
    	//$query = $this->db->get('cms_navigation', 10);
    	$query = $this->db->query('SELECT navigation_id, navigation_name FROM cms_navigation');
    	return $query->result();
    }

    function insert_entry($data)
    {
        $this->db->insert('cms_navigation', $data);
    }

    function update_entry($data)
    {
        $this->db->update('articles', $this, array('id' => $data['id']));
    }

}